/*
 * stack.h
 *
 *  Created on: 25.12.2012
 *      Author: Michael
 */

#ifndef STACK_H_
#define STACK_H_

typedef struct Stack {
	unsigned int _size;
	int _values[100];
	int _index;

	/* methods */
	void (*push)(struct Stack* pThis, int value);
	int (*pop)(struct Stack* pThis);
	int (*peak)(struct Stack* pThis);
	void (*print)(struct Stack* pThis);
} Stack_t;

/*
 * Create a new stack object
 */
Stack_t* createStack(void);

/**
 * Push a value on top of the stack
 */
void push(Stack_t* pThis, int value);

/*
 * Pop the top value from the stack
 */
int pop(Stack_t* pThis);

/*
 * Get the top value without removing it
 */
int peak(Stack_t* pThis);

/*
 * Print the stack
 */
void print(Stack_t* pThis);

#endif /* STACK_H_ */
